package com.example.demo.service.impl;

import com.example.demo.dao.NoticeDao;
import com.example.demo.dao.Public_infoDao;
import com.example.demo.entity.Notice;
import com.example.demo.entity.Public_info;
import com.example.demo.service.NoticeService;
import com.example.demo.service.Public_infoService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class Public_infoServiceImpl  implements Public_infoService {
    @Resource
    Public_infoDao public_infoDao;

    @Override
    public int insertnotice(Public_info public_info) {
        System.out.println(public_info);
        return  public_infoDao.insertnotice(public_info);

    }



    @Override
    public List<Public_info> selectAll() {
        return public_infoDao.selectAll();
    }

    @Override
    public Public_info selectid(int id) {
        return public_infoDao.selectid(id);
    }


    @Override
    public int updateid(Public_info public_info) {
        System.out.println(public_info);
        public_infoDao.updateid(public_info);
        return 1;
    }
    @Override
    public int deleteid(int id) {
        public_infoDao.deleteid(id);
        return 1;
    }
}
